package com.example.dish.api;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.example.common.Result;
import com.example.dish.service.DishService;
import com.example.dish_model.entity.Dish;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @author: sjz
 * @since: 2024/7/12 9:20
 */
@Slf4j
@RestController
@RequestMapping("/dishApi")
public class DishApi {

    @Resource
    private DishService dishService;

    @PostMapping("/list")
    public List<Dish> list(LambdaQueryWrapper<Dish> wrapper) {

        return dishService.list(wrapper);
    }
}
